<div class="left">
    <?php $this->widget("AdminLodeGame")?>
</div>
<form action="" method="post" name="congso-form" id = "congso-form">
<div class="right-main">
    <div class="righ-cont">
        <div class="right">
            <div class="title_style"> <span><b>Cộng xổ LoDo Game</b></span></div>
            <p>Điền tỉnh, ngày để cộng sổ</p>
            <div class="tool clearfix">
                <table cellspacing="0" cellpadding="0" border="0" width="100%">
                    <tbody>
                        <tr>
                            <td width="120" class="text-right"><label>Tỉnh</label></td> 
                            <td width="150"><select class="w90" name="province_id">
                                                <option value ="0">Tất cả</option>
                                                <?php for($i=0;$i<count($province);$i++){?>
                                                <option value="<?=$province[$i]['id']?>" <?=$province_id==$province[$i]['id']?"selected='selected'":""?>><?=$province[$i]['name']?></option>
                                                <?php }?>
                                            </select></td>
                            <td width="80" class="text-right"><label>Từ ngày</label></td>
                            <td width="100">
                                <?php        
                                            $this->widget('zii.widgets.jui.CJuiDatePicker', array(
                                            'id'=>'from',
                                            'name'=>'from',
                                            'value'=>isset($from)?$from:date("d-m-Y",time()),
                                            'options'=>array(
                                            'showAnim'=>'fold',
                                            'dateFormat'=>'dd-mm-yy',
                                            ),
                                            'htmlOptions'=>array(
                                            'readonly'=>'readonly',
                                            ),
                                            ));                                     
                                    ?>                                       
                            </td>
                            <td width="60" class="text-right"><label>Đến ngày</label></td>
                            <td width="100">
                                <?php        
                                            $this->widget('zii.widgets.jui.CJuiDatePicker', array(
                                            'id'=>'to',
                                            'name'=>'to',
                                            'value'=>isset($to)?$to:date("d-m-Y",time()),
                                            'options'=>array(
                                            'showAnim'=>'fold',
                                            'dateFormat'=>'dd-mm-yy',
                                            ),
                                            'htmlOptions'=>array(
                                            'readonly'=>'readonly',
                                            ),
                                            ));                                     
                                    ?>                                       
                            </td>
                            <td><input type="submit" value="Cộng xổ" /></td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            <hr class="linegray" />
            <?php if($from == $to){?>
            <div class="title_style"> <span><b class="clred">Kết quả cộng xổ ngày <?=str_replace("-","/",$from)?></b></span></div>
            <?php }else{?>
            <div class="title_style"> <span><b class="clred">Kết quả cộng xổ từ <?=str_replace("-","/",$from)?> đến <?=str_replace("-","/",$to)?> </b></span></div>
            <?php }?>
            <div class="tablestyle clearfix">
                <table cellspacing="0" cellpadding="0" border="0" width="100%">
                    <tbody>
                        <tr>
                            <td class="text-left"><strong class="s14">Bảng Lo Game</strong></td>
                            <td width="10">&nbsp;</td>
                            <td class="text-left"><strong class="s14">Bảng Do Game</strong></td>
                            <td width="10">&nbsp;</td>
                            <td class="text-left"><strong class="s14">Bảng Xien Game</strong></td>
                        </tr>
                        <tr>
                            <td valign="top">
                                <div class="table clearfix">
                                    <table cellspacing="0" cellpadding="0" border="0" width="100%">
                                        <tbody valign="top">                                            
                                            <tr class="bg_gray">
                                                <td width="33%"><strong>Bộ số</strong></td>
                                                <td width="33%"><strong>Xu cược</strong></td>
                                                <td width="33%"><strong>Xu thưởng </strong></td>
                                            </tr>                                           
                                            <?php for($i = 0;$i<count($ticket_lo);$i++){ ?>
                                                <?php for($j = 0;$j<count($ticket_detail_lo[$i]);$j++){ ?> 
                                            <tr>
                                                <td><?=$ticket_detail_lo[$i][$j]['boso']?></td>
                                                <td><?=$ticket_detail_lo[$i][$j]['xu']?></td>
                                                <td><?=$ticket_detail_lo[$i][$j]['tien_thuong']?></td>
                                            </tr>
                                                <?php }?> 
                                            <?php }?>
                                            <tr>
                                                <td><strong class="clred">Tổng cộng</strong></td>
                                                <td><strong class="clred"><?=$total_datcuoc_lo?></strong></td>
                                                <td><strong class="clred"><?=$total_tienthuong_lo?></strong></td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </td>
                            <td width="10">&nbsp;</td>
                            <td valign="top">
                                <div class="table clearfix">
                                    <table cellspacing="0" cellpadding="0" border="0" width="100%">
                                        <tbody>
                                            
                                            <tr class="bg_gray">
                                                <td width="33%"><strong>Số đặt cược</strong></td>
                                                <td width="33%"><strong>Xu cược</strong></td>
                                                <td width="33%"><strong>Xu thưởng </strong></td>
                                            </tr>
                                            <?php for($i = 0;$i<count($ticket_de);$i++){ ?>
                                                <?php for($j = 0;$j<count($ticket_detail_de[$i]);$j++){ ?> 
                                            <tr>
                                                <td><?=$ticket_detail_de[$i][$j]['boso']?></td>
                                                <td><?=$ticket_detail_de[$i][$j]['xu']?></td>
                                                <td><?=$ticket_detail_de[$i][$j]['tien_thuong']?></td>
                                            </tr>
                                                <?php }?> 
                                            <?php }?>
                                            <tr>
                                                <td><strong class="clred">Tổng cộng</strong></td>
                                                <td><strong class="clred"><?=$total_datcuoc_de?></strong></td>
                                                <td><strong class="clred"><?=$total_tienthuong_de?></strong></td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </td>
                            <td width="10">&nbsp;</td> 
                            <td valign="top">
                                <div class="table clearfix">
                                    <table cellspacing="0" cellpadding="0" border="0" width="100%">
                                        <tbody>
                                            
                                            <tr class="bg_gray">
                                                <td width="33%"><strong>Bộ số</strong></td>
                                                <td width="33%"><strong>Xu cược</strong></td>
                                                <td width="33%"><strong>Xu thưởng </strong></td>
                                            </tr>
                                            <?php for($i = 0;$i<count($ticket_xien);$i++){ ?>
                                                <?php for($j = 0;$j<count($ticket_detail_xien[$i]);$j++){ ?> 
                                            <tr>
                                                <td><?=$ticket_detail_xien[$i][$j]['boso']?></td>
                                                <td><?=$ticket_detail_xien[$i][$j]['xu']?></td>
                                                <td><?=$ticket_detail_xien[$i][$j]['tien_thuong']?></td>
                                            </tr>
                                                <?php }?> 
                                            <?php }?>
                                            <tr>
                                                <td><strong class="clred">Tổng cộng</strong></td>
                                                <td><strong class="clred"><?=$total_datcuoc_xien?></strong></td>
                                                <td><strong class="clred"><?=$total_tienthuong_xien?></strong></td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </td>
                        </tr
                    ></tbody>
                </tbody>
            </table>
        </div>
        </div>
    </div>
</div>
</form>